package com.edu.jvm.unit01.methodArea;

import java.io.Serializable;

/**
 * @author five-five
 * @date 2021/9/17-16:37
 */
public class MethodInnerStructureTest extends Object implements Comparable<String>, Serializable {

    //属性(域)
    private int num = 0;
    private static String string = "测试方法的内部结构";

    /**
     * 使用gif图理清下列方法字节码指令
     *
     * @param args JVM参数
     */
    public static void main(String[] args) {
        int x = 500;
        int y = 100;
        int a = x / y;
        int b = 20;
        System.out.println(a + b);
    }

    public void test01() {
        int count = 20;
        System.out.println("count=" + count);
    }

    public static int test02(int cal) {
        int result = 20;
        try {
            int value = 30;
            result = value / cal;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return result;
    }

    /**
     * 使用gif图理清下列方法字节码指令
     */
    public static int test03() {
        int result = 20;
        try {
            int value = 30;
            int dev = 6;
            result = value / dev;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return result;
    }

    @Override
    public int compareTo(String o) {
        return 0;
    }
}
